/**
 *	@file	safaril_def.h
 *	@brief	サファリレイアウト　リテラル定義
 *	@author	Miyuki Iwasawa
 */

#ifndef __H_SAFARIL_DEF_H__
#define __H_SAFARIL_DEF_H__

///フレームナンバー定義
#define UFRM_3D		(GF_BGL_FRAME0_M)
#define UFRM_MSG	(GF_BGL_FRAME1_M)
#define UFRM_FRAME	(GF_BGL_FRAME2_M)
#define UFRM_BACK	(GF_BGL_FRAME3_M)

#define UFRM_MSG_PRI	(0)
#define UFRM_FRAME_PRI	(1)
#define UFRM_3D_PRI		(2)
#define UFRM_BACK_PRI	(3)

#define DFRM_MSG	(GF_BGL_FRAME0_S)
#define DFRM_TEXT	(GF_BGL_FRAME1_S)
#define DFRM_DESIGN	(GF_BGL_FRAME2_S)
#define DFRM_BACK	(GF_BGL_FRAME3_S)

#define DFRM_MSG_PRI		(0)
#define DFRM_TEXT_PRI		(1)
#define DFRM_DESIGN_PRI		(2)
#define DFRM_BACK_PRI		(3)

///シーケンスNo定義
enum{
 SEQ_FADEIN,
 SEQ_OBJ_SELECT,
 SEQ_OBJ_PLACE,
 SEQ_FADEOUT,
 SEQ_EXIT,
};

///////////////////////////////////////////////////////////////
//ローカルシーケンス定義
enum{
 LSEQ_NULL,
 LSEQ_PLACE_CHK,
 LSEQ_MSG_WAIT,
 LSEQ_END,
};

enum{
 MODE_BLOCK,
 MODE_CHANGE,
 MODE_SORT,
};

#define PAGE_ITEM_MAX	(6)

enum{
 CPOS_PANEL01,
 CPOS_PANEL02,
 CPOS_PANEL03,
 CPOS_PANEL04,
 CPOS_PANEL05,
 CPOS_PANEL06,
 CPOS_BACK,
 CPOS_LEFT,
 CPOS_RIGHT,
};

enum{
 VIEW_SELECT,
 VIEW_TARGET,
};

//=======================================
///アルファ値設定
//=======================================
#define ALPHA_SECOND	(28)
#define ALPHA_FIRST		(4)

#define ALPHA_MASK_1ST	(GX_BLEND_PLANEMASK_BG0)
#define ALPHA_MASK_2ND	(GX_BLEND_PLANEMASK_BG1|GX_BLEND_PLANEMASK_BG2|\
						 GX_BLEND_PLANEMASK_BG3|GX_BLEND_PLANEMASK_OBJ)


#define PAD_KEY_ALL	(PAD_KEY_LEFT|PAD_KEY_RIGHT|PAD_KEY_UP|PAD_KEY_DOWN)

typedef enum{
 SYSMSG_IS_PLACE,
 SYSMSG_PLACE,
 SYSMSG_REST_NUM,
 SYSMSG_NO_PLACE,
 SYSMSG_MAX,
}SYSMSG_IDX;

typedef enum{
 TALKMSG_NG_SIZE,
 TALKMSG_NG_GROUND,
 TALKMSG_NG_WATER,
 TALKMSG_MAX,
}TALKMSG_IDX;

enum{
 PAGE_DOWN,
 PAGE_UP,
};

///////////////////////////////////////////////////////////////
//アクターリソース
#define RESACT_NORMAL	(0)

enum{
 ACT_CURSOR,
 ACT_BACK,
 ACT_ALLOW_L,
 ACT_ALLOW_R,
 SAFARIO_ACTMAX,
};

enum{
 ANM_CURSOR,
 ANM_BCURSOR,
 ANM_BACK_N,
 ANM_BACK_A,
 ANM_BACK_P,
 ANM_AL_LN,
 ANM_AL_LA,
 ANM_AL_LP,
 ANM_AL_RN,
 ANM_AL_RA,
 ANM_AL_RP,
};

typedef enum{
 BACK_BTN_ACTIVE,
 BACK_BTN_ANM,
 BACK_BTN_PASSIVE,
}BACK_BTN_STATE;

#define SAFARIO_ACTRES_MAX	(1)
#define SAFARIO_ACT_PALRES_MAX	(1)

////////////////////////////////////////////////////////////////
///メッセージ参照定義
enum{
 MSGIDX_EXP_PLACE01,
 MSGIDX_EXP_PLACE02,
 MSGIDX_EXP_REST01,
 MSGIDX_EXP_REST02,
 MSGIDX_EXP_MAX
};

#define SAFARIO_BUFLEN	(256)
#define SAFARIO_WORDSET_BUFLEN	(16)
#define SAFARIO_WORDSET_BUFNUM	(2)

///////////////////////////////////////////
///パレット定義
#define EXP_FONT_PAL	(1)
#define PANEL_FONT_PAL	(4)
#define SYS_FONT_PAL	(4)
//ここまでnclの中
///////////////////////////////////
#define BMP_TALK_WIN_PAL	(12)
#define TALK_FONT_PAL	(13)
#define YESNO_WIN_PAL	(14)	//2本占有

#define	FCOL_W_BLACK	( GF_PRINTCOLOR_MAKE( FBMP_COL_BLACK, FBMP_COL_BLK_SDW, FBMP_COL_WHITE ) )		// フォントカラー：黒
#define	FCOL_N_BLACK	( GF_PRINTCOLOR_MAKE( FBMP_COL_BLACK, FBMP_COL_BLK_SDW, FBMP_COL_NULL ) )		// フォントカラー：黒
#define	FCOL_N_WHITE	( GF_PRINTCOLOR_MAKE( FBMP_COL_WHITE, FBMP_COL_BLK_SDW, FBMP_COL_NULL ) )		// フォントカラー：黒

#define	FCOL_EXP_W		( GF_PRINTCOLOR_MAKE( 1, 2, 0 ) )		// フォントカラー：白
#define	FCOL_PANEL_W	( GF_PRINTCOLOR_MAKE( 1, 2, 0 ) )		// フォントカラー：白
#define	FCOL_SYS_W		( GF_PRINTCOLOR_MAKE( 3, 4, 0 ) )		// フォントカラー：白

///フォントカラー
#define SYSMSG_COL_BACK	(2)
#define SYSMSG_FCOL	(GF_PRINTCOLOR_MAKE(3,1,EXPMSG_COL_BACK))

////////////////////////////////////////////////////////////////////////
///BMPウィンドウ
enum{
 WIN_MSG,
 WIN_TMSG,
 WIN_BACK,
 WIN_PAGE,
 WIN_TARGET,
 WIN_EXP,
 WIN_LIST01,
 WIN_LIST02,
 WIN_LIST03,
 WIN_LIST04,
 WIN_LIST05,
 WIN_LIST06,
 WIN_MAX,
};

#define BGU_BMPCHAR_BASE	(1024)
#define BGD_BMPLCHAR_BASE	(1024)
#define FONT_PAL	(TALK_FONT_PAL)

#define BMP_TALK_WIN_CGX	(BGD_BMPLCHAR_BASE-TALK_WIN_CGX_SIZ)

#define BMPL_YESNO_PAL	(YESNO_WIN_PAL)
#define BMPL_YESNO_CGX	(BMP_TALK_WIN_CGX-TOUCH_SW_USE_CHAR_NUM)
#define BMPL_YESNO_PX	(26)
#define BMPL_YESNO_PY	(4)
#define BMPL_YESNO_FRM	(DFRM_MSG)

///メッセージウィンドウ
#define BMPL_MSG_PX	(2)
#define BMPL_MSG_PY	(1)
#define BMPL_MSG_SX	(28)
#define BMPL_MSG_SY	(2)
#define BMPL_MSG_SIZ	(BMPL_MSG_SX*BMPL_MSG_SY)
#define BMPL_MSG_FRM	(DFRM_MSG)
#define BMPL_MSG_PAL	(SYS_FONT_PAL)
#define BMPL_MSG_CGX	(BMPL_YESNO_CGX-BMPL_MSG_SIZ)

///会話メッセージウィンドウ
#define BMPL_TMSG_PX	(2)
#define BMPL_TMSG_PY	(21)
#define BMPL_TMSG_SX	(27)
#define BMPL_TMSG_SY	(2)
#define BMPL_TMSG_SIZ	(BMPL_TMSG_SX*BMPL_TMSG_SY)
#define BMPL_TMSG_FRM	(DFRM_MSG)
#define BMPL_TMSG_PAL	(TALK_FONT_PAL)
#define BMPL_TMSG_CGX	(BMPL_MSG_CGX-BMPL_TMSG_SIZ)

///戻るボタンウィンドウ
#define BMPL_BACK_PX	(25)
#define BMPL_BACK_PY	(21)
#define BMPL_BACK_SX	(6)
#define BMPL_BACK_SY	(3)
#define BMPL_BACK_SIZ	(BMPL_BACK_SX*BMPL_BACK_SY)
#define BMPL_BACK_FRM	(DFRM_TEXT)
#define BMPL_BACK_PAL	(FONT_PAL)
#define BMPL_BACK_CGX	(BMPL_TMSG_CGX-BMPL_BACK_SIZ)

///ページ
#define BMPL_PAGE_PX	(13)
#define BMPL_PAGE_PY	(21)
#define BMPL_PAGE_SX	(6)
#define BMPL_PAGE_SY	(2)
#define BMPL_PAGE_SIZ	(BMPL_PAGE_SX*BMPL_PAGE_SY)
#define BMPL_PAGE_FRM	(DFRM_TEXT)
#define BMPL_PAGE_PAL	(SYS_FONT_PAL)
#define BMPL_PAGE_CGX	(BMPL_BACK_CGX-BMPL_PAGE_SIZ)

///ターゲット
#define BMPL_TARGET_PX	(9)
#define BMPL_TARGET_PY	(8)
#define BMPL_TARGET_SX	(14)
#define BMPL_TARGET_SY	(2)
#define BMPL_TARGET_SIZ	(BMPL_TARGET_SX*BMPL_TARGET_SY)
#define BMPL_TARGET_FRM	(DFRM_TEXT)
#define BMPL_TARGET_PAL	(PANEL_FONT_PAL)
#define BMPL_TARGET_CGX	(BMPL_PAGE_CGX-BMPL_TARGET_SIZ)

//オブジェリスト
#define BMPL_LIST_PX	(1)
#define BMPL_LIST_PY	(6)
#define BMPL_LIST_SX	(14)
#define BMPL_LIST_SY	(2)
#define BMPL_LIST_OX	(16)
#define BMPL_LIST_OY	(5)
#define BMPL_LIST_SIZ	(BMPL_LIST_SX*BMPL_LIST_SY)
#define BMPL_LIST_CGX	(BMPL_TARGET_CGX-BMPL_LIST_SIZ)
#define BMPL_LIST_PAL	(PANEL_FONT_PAL)
#define BMPL_LIST_FRM	(DFRM_TEXT)

///上画面メッセージウィンドウ
#define BMPL_EXP_PX	(2)
#define BMPL_EXP_PY	(18)
#define BMPL_EXP_SX	(28)
#define BMPL_EXP_SY	(6)
#define BMPL_EXP_SIZ	(BMPL_EXP_SX*BMPL_EXP_SY)
#define BMPL_EXP_FRM	(UFRM_MSG)
#define BMPL_EXP_PAL	(EXP_FONT_PAL)
#define BMPL_EXP_CGX	(BGU_BMPCHAR_BASE-BMPL_EXP_SIZ)

///////////////////////////////////////////////////////////////////////
//BG表示位置
#define PANEL_CSX	(16)
#define PANEL_CSY	(4)
#define PANEL_COX	(16)
#define PANEL_COY	(5)
#define PANEL_CPX	(0)
#define PANEL_CPY	(5)

///////////////////////////////////////////////////////////////////////
//アクター表示位置
#define PANEL1_PRI	(2)
#define PANEL1_SPRI	(128)
#define PANEL2_PRI	(3)
#define PANEL2_SPRI	(128)
#define BACK_PRI	(3)

///戻るボタン位置
#define BACK_BTN_PX	(28*8)
#define BACK_BTN_PY	(22*8+4)

//矢印表示位置
#define ALLOW_L_PX	(4*8)
#define ALLOW_PY	(22*8)
#define ALLOW_R_PX	(9*8)

/////////////////////////////////////////////////////////////////
//タッチパネル
#define TP_BACK_PX	(24*8)
#define TP_BACK_PY	(21*8)
#define TP_BACK_SX	(8*8)
#define TP_BACK_SY	(3*8)

#define TP_PANEL_SX		(PANEL_CSX*8)
#define TP_PANEL_SY		(PANEL_CSY*8)
#define TP_PANEL_OX		(PANEL_COX*8)
#define TP_PANEL_OY		(PANEL_COY*8)

#define TP_PANEL_PX01	(PANEL_CPX*8)
#define TP_PANEL_PX02	(TP_PANEL_PX01+TP_PANEL_OX)
#define TP_PANEL_PY01	(PANEL_CPY*8)
#define TP_PANEL_PY02	(TP_PANEL_PY01+TP_PANEL_OY)
#define TP_PANEL_PY03	(TP_PANEL_PY02+TP_PANEL_OY)

#define TP_ALLOW_SX		(46)
#define TP_ALLOW_SY		(24)
#define TP_ALLOWL_PX	(ALLOW_L_PX-(TP_ALLOW_SX/2))
#define TP_ALLOWR_PX	(ALLOW_R_PX-(TP_ALLOW_SX/2))
#define TP_ALLOW_PY		(ALLOW_PY-(TP_ALLOW_SY/2))

#endif	//__H_SAFARIL_DEF_H__
